package jp.bluecab.bluecabsystem.locrecserv.classes;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class GPSLatest {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
	
	// ユーザーID
	@Persistent
	private long userid;
	// 緯度
	@Persistent
	private double latitude;
	// 経度
	@Persistent
	private double longitude;
	@Persistent
	private double orientation;
	@Persistent
	private int operationmode;
	// データ作成日時
	@Persistent
	private Date createdAt;
	
	public GPSLatest(long user, double lat, double lng, double ori, int op_mode, Date nowdatetime) {
		this.userid = user;
		this.latitude = lat;
		this.longitude = lng;
		this.orientation = ori;
		this.operationmode = op_mode;
		this.createdAt = nowdatetime;
	}
	
	// ユーザID取得
	public long getUserid() {
		return userid;
	}
	
	public double getOrientation() {
		return orientation;
	}
	
	public double getLatitude() {
		return latitude;
	}
	
	public double getLongitude() {
		return longitude;
	}
	
	public Long getId() {
		return id;
	}
	
	public Date getCreatedAt() {
		return createdAt;
	}
	
	public int getOperationmode() {
		return operationmode;
	}
}
